home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / Chip_2004-11_cd1.bin / zkuste / dolby / download / dvdlab / DVDlabProRC2b.exe / {app} / Extras / Script / Paste BG.talk < prev    next >
Text File  |  2004-03-22  |  1KB  |  45 lines

  1. /*    Link Bitmap 1.0
  2.     by Oscar, 12 Dec 2003
  3.     
  4.     To run this: DROP the Script from Assets to the Object in Menu.
  5.     
  6.     Some interesting repeating effect. It grabs the Menu, then use it on the object.
  7.     Now it repeat this few times in a loop to get the repeating effects.
  8.     
  9.     Note: because of the bitmap merging, the text will become not-editable after you apply this
  10. */
  11.  
  12. // Get the current menu and selected object when you drag and drop script
  13. // Note: if testing from Script editor make sure you have just one menu opened on desktop,
  14. //       in such case the MenuGetCurSel will return currently opened menu 
  15.  
  16. menu = MenuGetCurSel() 
  17. // VTS menu 1..255, VMG menu 10001..10255 
  18.  
  19. // show the current menu on top of all others
  20. MenuActivate(menu)
  21.  
  22. object= ObjectGetCurSel(menu) 
  23.  
  24. if (object==0) then
  25.     print "No object Selected"
  26.     end
  27. endif
  28. ProgressBar(0,10,"Infiniting ;-)")
  29.  
  30. // save original image
  31. ImgGrabObject(2,menu,object)
  32.  
  33. nW = ImgGetWidth(2)
  34. nH = ImgGetHeight(2)
  35.  
  36. for x = 1 to 10 
  37.     ProgressSetPos(x)
  38.  
  39.     ImgGrabMenuFrame(1,menu)
  40.     ImgResize(1,nW,nH)
  41.     // copy alpha from original (2) to working buffer (1)
  42.     ImgCopyAlpha(2,1,0,0)
  43.     ImgSetToObject(1,menu,object)
  44. next x